<!DOCTYPE html>
<html
  layout:decorator="components/layout"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  lang="zh-CN"
>
<head>
  <title>备案监管</title>
</head>
<body>
<div
  layout:fragment="content"
  id="app" v-cloak
>
  <div class="container">

    <div class="myHeader">
      <div class="myHeader-title">
        备案监管
      </div>
    </div>
    <el-row>
      <el-form label-width="80px">
        <el-col :span="3">
          <el-form-item label-width="0px">
            <el-button type="primary" size="mini" icon="el-icon-search" @click="toggle">高级搜索</el-button>
          </el-form-item>
        </el-col>

        <el-col :span="6">
          <el-form-item label="所在机房:">
            <el-select v-model="form.houseId" @change="searchPage" placeholder="请选择" size="mini" clearable>
              <el-option v-for="house in houses" :label="house.houseName" :key="house.id" :value="house.id">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="6">
          <el-form-item label="处置状态:">
            <el-select v-model="form.dealStatus" @change="searchPage" placeholder="请选择" size="mini" clearable>
              <el-option v-for="[key,val] in fieldFormatter.moFilingSupervise.dealStatusMap" :label="val" :key="key"
                         :value="key">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="6">
          <el-form-item label="备案状态:">
            <el-select v-model="form.filingStatus" @change="searchPage" placeholder="请选择" size="mini" clearable>
              <el-option v-for="[key,val] in fieldFormatter.moFilingSupervise.filingStatusMap" :label="val" :key="key"
                         :value="key">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>

    <el-row>
      <el-form label-width="100px" class="container-search" v-show="formShow">
        <el-row :gutter="10">
          <el-col :span="9">
            <el-form-item label="顶级域名:">
              <el-input
                v-model="form.topDomain"
                clearable
                show-word-limit
                maxlength="64"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.topDomainAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>

          <el-col :span="9">
            <el-form-item label="子域名:">
              <el-input
                v-model="form.subDomain"
                clearable
                show-word-limit
                maxlength="30"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.subDomainAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>

          <el-col :span="9">
            <el-form-item label="应用IP:">
              <el-input
                v-model="form.ip"
                clearable
                show-word-limit
                maxlength="30"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.ipAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>

          <el-col :span="9">
            <el-form-item label="备案号:">
              <el-input
                v-model="form.filingNumber"
                clearable
                show-word-limit
                maxlength="30"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.filingNumberAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>


          <el-col :span="12">
            <el-form-item label="首次采集时间:">
              <rx-range-date
                v-model="form.firstGatherTimeRange"
                @change="arr => changeRangeDate('firstGatherTimeStart', 'firstGatherTimeEnd')(arr)"
              ></rx-range-date>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="最后活跃时间:">
              <rx-range-date
                v-model="form.lastActiveTimeRange"
                @change="arr => changeRangeDate('lastActiveTimeStart', 'lastActiveTimeEnd')(arr)"
              ></rx-range-date>
            </el-form-item>
          </el-col>

        </el-row>

        <div style="text-align:center; margin-bottom:20px">
          <el-button type="primary" size="medium" @click="searchPage">查 找</el-button>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <el-button type="primary" size="medium" @click="resetPage">重 置</el-button>
        </div>
      </el-form>
    </el-row>


    <!--内容-->
    <my-table
      :data="page.records"
      :columns="columns"
      @handle-selection-change="selection"
    >
      <template #sub_domain_count="row">
        <a
          href=""
          @click.stop.prevent="showWindow(row.row)"
        >{{row.row.subDomainCount}}</a>
      </template>
    </my-table>
    <div class="pagination">
      <el-pagination
        background
        @size-change="changeSize"
        @current-change="goto"
        :current-page="page.current"
        :page-sizes="[10, 20, 30]"
        :page-size="page.size"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total"
      >
      </el-pagination>
      <div class="pagination-tool">
        <el-button
          type="primary"
          size="mini"
          @click="toggleDealPanelShow"
          v-realm="'illegal-monitoring:mo-filing-supervise:edit'"
        >批量处置
        </el-button>
        <el-button
          type="primary"
          size="mini"
          @click="dealCancelSelected"
          v-realm="'illegal-monitoring:mo-filing-supervise:edit'"
        >取消处置
        </el-button>
        <el-button
          type="primary"
          size="mini"
          @click="filingSelected"
          v-realm="'illegal-monitoring:mo-filing-supervise:edit'"
        >备案检查
        </el-button>
        <el-button
          type="primary"
          size="mini"
          @click="exportFile"
          v-realm="'illegal-monitoring:mo-filing-supervise'"
        >导出
        </el-button>
        <el-button
          type="danger"
          size="mini"
          @click="deleteSelected"
          v-realm="'illegal-monitoring:mo-filing-supervise:edit'"
        >批量删除
        </el-button>
      </div>
    </div>

    <div
      class="container"
      v-show="dealPanelShow"
    >
      <div class="myHeader">
        <div class="myHeader-title">
          非法信息监测
        </div>
      </div>
      <el-form label-width="126px">
        <el-form-item label="处置操作:">
          <rx-radio
            v-model="dealPanelForm.dealStatus"
            :map="fieldFormatter.moFilingSupervise.dealResultMap"
          ></rx-radio>
        </el-form-item>
        <el-form-item label="处置备注:">
          <textarea
            id="remark"
            v-model="dealPanelForm.remark"
            cols="50%"
          >
              </textarea>
        </el-form-item>
      </el-form>
      <div>
        <el-button
          type="primary"
          size="mini"
          @click="dealSelected"
        >确认
        </el-button>
        <el-button
          type="primary"
          size="mini"
          @click="initDealPanel"
        >重置
        </el-button>
      </div>
    </div>
    <el-dialog :title="title" :visible.sync="dialogTableVisible">
      <el-table :data="domains" border
                style="width: 100%">
        <el-table-column property="ip" label="应用ip"></el-table-column>
        <el-table-column property="findDomainListDomain" label="域名"></el-table-column>
        <el-table-column property="visitsCount" label="访问量"></el-table-column>
        <el-table-column property="recordNumber" label="解析IP/备案号"></el-table-column>
        <el-table-column label="类型">子域名</el-table-column>
        <el-table-column property="findDomainListFirstTime" label="首次采集时间"></el-table-column>
        <el-table-column property="findDomainListLastTime" label="最后活跃时间"></el-table-column>
      </el-table>
    </el-dialog>
  </div>
</div>
<div layout:fragment="js">
  <script src="/static/js/component/SearchActionCondition.js"></script>
  <script src="/static/js/module/illegal-monitor/model/MoFilingSupervise.js"></script>
  <script src="/static/js/module/illegal-monitor/api/moFilingSuperviseApi.js"></script>
  <script src="/static/js/module/basic-data/api/baseHouseInfoApi.js"></script>
  <script src="/static/js/module/illegal-monitor/admin_web_icp.js"></script>
</div>
</body>
</html>
